import java.util.Scanner;

public class Ex4_30{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("Enter the amount: ");
		double amount = input.nextDouble();
		System.out.print("Enter the annual interest rate: ");
		double rate = input.nextDouble();
		rate /= 1200;
		System.out.print("Enter the number of month: ");
		int month = input.nextInt();
		double value = 0;
		for (int i = 1; i <= month; i++){
			value = (amount + value) * (1 + rate);
		}
		System.out.printf("After %d month(es), the value is: %.3f.\n", month, value);
	}
}
